const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('preView', {
    // 暴露获取值的方法
    getData: (callback) => ipcRenderer.on('preview-data', (e, ...args)=> callback(...args)),
    closePreView: () => ipcRenderer.send('close-preview')
})